<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      .box {
        position: relative;
        height: 10px;
      }
      .box::after {
        content: "";
        position: absolute;
        height: 1px;
        width: 100%;
        bottom: 0;
        left: 0;
        background-color: #000;
      }

      @media screen and (-webkit-min-device-pixel-ratio: 2) {
        .box::after {
          transform: scaleY(0.5);
        }
      }

      @media screen and (-webkit-min-device-pixel-ratio: 3) {
        .box::after {
          transform: scaleY(0.33333);
        }
      }

      @media screen and (-webkit-min-device-pixel-ratio: 4) {
        .box::after {
          transform: scaleY(0.25);
        }
      }
    </style>
  </head>
  <body>
    <div class="box"></div>
  </body>
</html>
